<include file="public/layout" />
<body style="background-color: #FFF; overflow: auto;">
<div id="append_parent"></div>
<div id="ajaxwaitid"></div>
<div class="page">
  <div class="fixed-bar">
    <div class="item-title"><a class="back" href="javascript:history.back();" title="返回列表"><i class="fa fa-arrow-circle-o-left"></i></a>
      <div class="subject">
        <h3>酒厂体验- 添加修改报名人员</h3>
        <h5>添加或编辑报名人员信息</h5>
      </div>
    </div>
  </div>
  <div class="explanation" id="explanation">
    <div class="title" id="checkZoom"><i class="fa fa-lightbulb-o"></i>
      <h4 title="提示相关设置操作时应注意的要点">操作提示</h4>
      <span id="explanationZoom" title="收起提示"></span>
    </div>
    <ul>
      <li>请不要误删除分类信息，不可恢复</li>
    </ul>
  </div>
  <form action="{:U('Cellar/addeditTaster')}" method="post" class="form-horizontal" id="category_form">
    <div class="ncap-form-default">
      <dl class="row">
        <dt class="tit">
          <label for="t_mane"><em>*</em>姓名</label>
        </dt>
        <dd class="opt">
          <input type="text" placeholder="姓名" class="input-txt" name="name" value="{$taster.name}">
        </dd>
      </dl>
      <dl class="row">
        <dt class="tit">
          <label for="t_mane"><em>*</em>手机号码</label>
        </dt>
        <dd class="opt">
          <input type="text" placeholder="手机号码" class="input-txt" name="phone" value="{$taster.phone}">
          <span class="err" id="err_name" style="color:#F00; display:none;"></span>
          <p class="notic"></p>
        </dd>
      </dl>
      <dl class="row">
        <dt class="tit">
          <label for="t_mane"><em>*</em>报名人数</label>
        </dt>
        <dd class="opt">
          <input type="text" placeholder="同行人数" class="input-txt" name="num" value="{$taster.num}">
          <span class="err" id="err_name" style="color:#F00; display:none;"></span>
          <p class="notic"></p>
        </dd>
      </dl>
      <dl class="row">
        <dt class="tit">
          <label for="t_mane"><em>*</em>状态</label>
        </dt>
        <dd class="opt">
          <select class="input-txt" name="state" style="color: #777;">
          	<option value="1" <if $taster.state == 1>selected="selected"</if>>有效</option>
          	<option value="0">无效</option>
          </select>
        </dd>
      </dl>
      <dl class="row">
        <dt class="tit">
          <label for="t_mane"><em>*</em>短信通知状态</label>
        </dt>
        <dd class="opt">
          <select class="input-txt" name="sendstatus" style="color: #777;">
          	<option value="0">未通知</option>
          	<option value="1" <if $taster.sendstatus == 1>selected="selected"</if>>已通知</option>
          </select>
        </dd>
      </dl>
      <dl class="row">
        <dt class="tit">
          <label for="t_mane"><em>*</em>特殊说明</label>
        </dt>
        <dd class="opt">
          <input type="text" placeholder="特殊说明" class="input-txt" name="info" value="{$taster.info}" style="height: 50px;">
        </dd>
      </dl>
      <if !empty($taster)>
	      <input name="id" value="{$taster.id}" type="hidden" />
	    </if>
      <div class="bot"><a id="submitBtn" class="ncap-btn-big ncap-btn-green" href="JavaScript:void(0);" onClick="ajax_submit_form('category_form','{:U('Cellar/addeditTaster?is_ajax=1',array('tid'=>$tid))}');">确认提交</a></div>
    </div>
  </form>
</div>
<script>  
    
/** 以下是编辑时默认选中某个商品分类*/
$(document).ready(function(){
	<if condition="$level_cat['2'] gt 0">	
		 // 如果当前是二级分类就让一级父id默认选中
		 $("#parent_id_1").val('{$level_cat[1]}'); 
		 get_category('{$level_cat[1]}','parent_id_2','0');		 
	</if>	 
	<if condition="$level_cat['3'] gt 0">
		 // 如果当前是三级分类就一级和二级父id默认 都选中
		 $("#parent_id_1").val('{$level_cat[1]}');		 	
		 get_category('{$level_cat[1]}','parent_id_2','{$level_cat[2]}');	
	</if>	
});
 
// 将品牌滚动条里面的 对应分类移动到 最上面
//javascript:document.getElementById('category_id_3').scrollIntoView();
var typeScroll = 0;
function spec_scroll(o){
	var id = $(o).val();	
	//if(!$('#type_id_'+id).is('dt')){
		//return false;
	//} 	 
	$('#ajax_brandList').scrollTop(-typeScroll);
	var sp_top = $('#type_id_'+id).offset().top; // 标题自身往上的 top
	var div_top = $('#ajax_brandList').offset().top; // div 自身往上的top
	$('#ajax_brandList').scrollTop(sp_top-div_top); // div 移动
	typeScroll = sp_top-div_top;
} 
</script>
</body>
</html>